const mongoose = require("mongoose");

let diaryItemsSchema = mongoose.Schema({
    diarybookId: {
        type: String,
        required: true
    },
    authorId:{
        type:String,
        required:true
    },
    createAt: {
        type: Date,
        default: Date.now()
    },
    ishidden:{
        type:Boolean,
        default:false
    },
    content:{
        type:String,
        required:true
    },
    importent:{
        type:Boolean,
        default:false
    },
    imgUrl:String,
    replyId:[String]
})

let diaryItemsModel = mongoose.model("diaryItems", diaryItemsSchema);

module.exports = diaryItemsModel;